#pragma once

#include <QtGui/QFrame>
#include <QtGui/QSpinBox>
#include <QtGui/QPushButton>
#include <QtGui/QLabel>
#include <QtGui/QCheckbox>
#include <QtGui/QRadioButton>
#include <QtCore/QTimer>

#include "MikinolQCameraWidget.h"
#include "MikinolQSkeletonTrackingDataWidget.h"
#include "MikinolSensor.h"

namespace Mikinol
{

class QSensorWidget :	public QFrame
{ 
	Q_OBJECT

public:
	QSensorWidget( QWidget* parent, Sensor* sensor );
	virtual ~QSensorWidget();

	Sensor*						getSensor() const { return mSensor; }

private slots:
	void						onTimerTimeOut();
	void						initializeSensor();
	void						shutdownSensor();
	void						angleValueChanged( int value );

private:
	Sensor*						mSensor;

	QTimer*						mTimer;
	
	QLabel*						mIdLabel;
	QLabel*						mStatusLabel;
	QLabel*						mAngleLabel;
	QSpinBox*					mAngleSpinBox;
	QLabel*						mAccelerationLabel;
	QCheckBox*					mColorCameraCheckBox;
	QCheckBox*					mDepthCameraCheckBox;
	QCheckBox*					mSkeletonTrackingCheckBox;
	QRadioButton*				mDepthRadioButton;
	QRadioButton*				mDepthAndPlayerIndexRadioButton;
	QPushButton*				mInitializeButton;
	QPushButton*				mShutdownButton;
	
	QCameraWidget*					mColorCameraWidget;
	QCameraWidget*					mDepthCameraWidget;
	QSkeletonTrackingDataWidget*	mSkeletonTrackingDataWidget;
};

}
